﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Base.Schema;
using Base.DataModel;

namespace Base.DataModel
{
    [SchemaElementName("duplication")]
    public class Duplication : SchemaItem
    {
        public Duplication(Entity target, Field targetField)
        {
            this._target = target;
            this._targetField = targetField;
        }

        private Entity _target;
        public Entity Target
        {
            get
            {
                return _target;
            }
        }

        private Field _targetField;
        public Field TargetField
        {
            get
            {
                return _targetField;
            }
        }

        [SchemaPreference("entity")]
        public Guid64 TargetId
        {
            get
            {
                return _target.Id;
            }
        }

        [SchemaPreference("field")]
        public Guid64 TargetFieldId
        {
            get
            {
                return _targetField.Id;
            }
        }
    }
}
